package com.kamkor.interviewer.server;

import java.io.Serializable;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

/**
 * 
 * @author kamkor
 *
 */
@SuppressWarnings("serial")
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Interview implements Serializable {
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;	
	
	@Persistent
	private Long adminKey;
	
	@Persistent
	private Long userKey;
	
	/** Last added question answer to this interview */
	@Persistent()
	private Long lastQAPostionNumber;
	
	@Persistent
	private String interviewerName;
	
	@Persistent
	private String interviewerInitials;
	
	@Persistent
	private String interviewedName;
	
	@Persistent
	private String interviewedInitials;
	
	public Interview() { }
	
	public Interview(String interviewerName, String interviewerInitials, String interviewedName, String interviewedInitials) {
		super();
		this.interviewerName = interviewerName;
		this.interviewerInitials = interviewerInitials;
		this.interviewedName = interviewedName;
		this.interviewedInitials = interviewedInitials;		
	}

	public Interview(Long id, Long adminKey, Long userKey,
			Long lastQAPostionNumber, String interviewerName,
			String interviewerInitials, String interviewedName,
			String interviewedInitials) {		
		this(interviewerName, interviewerInitials, interviewedName, interviewedInitials);
		this.id = id;
		this.adminKey = adminKey;
		this.userKey = userKey;
		this.lastQAPostionNumber = lastQAPostionNumber;		
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getInterviewerName() {
		return interviewerName;
	}

	public void setInterviewerName(String interviewerName) {
		this.interviewerName = interviewerName;
	}

	public String getInterviewedName() {
		return interviewedName;
	}

	public void setInterviewedName(String interviewedName) {
		this.interviewedName = interviewedName;
	}

	public void setInterviewerInitials(String interviewerInitials) {
		this.interviewerInitials = interviewerInitials;
	}

	public String getInterviewerInitials() {
		return interviewerInitials;
	}

	public void setInterviewedInitials(String interviewedInitials) {
		this.interviewedInitials = interviewedInitials;
	}

	public String getInterviewedInitials() {
		return interviewedInitials;
	}

	public void setAdminKey(Long adminKey) {
		this.adminKey = adminKey;
	}

	public Long getAdminKey() {
		return adminKey;
	}

	public void setUserKey(Long userKey) {
		this.userKey = userKey;
	}

	public Long getUserKey() {
		return userKey;
	}

	public void setLastQAPostionNumber(Long lastQAPostionNumber) {
		this.lastQAPostionNumber = lastQAPostionNumber;
	}

	public Long getLastQAPostionNumber() {
		return lastQAPostionNumber;
	}

}
